package cn.com.dwr.modules.app.controller;

import cn.com.dwr.common.lang.Result;
import cn.com.dwr.service.HomeService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/app")
public class HomeController {

    @Resource
    HomeService homeService;

    /**
     * 首页数据
     * @return
     */
    @GetMapping("/home")
    public Result home(){
        return Result.success(homeService.getContents());
    }
}
